!function (c) {
  "use strict";

  var B,
      s = function (c, B) {
    this.$element = c;
    this.defaults = {
      vSpace: 5,
      server: "",
      captchaIdEle: "",
      captchaValueEle: "",
      imgSize: {
        width: "288px",
        height: "225px"
      },
      blockSize: {
        width: "60px",
        height: "225px"
      },
      barSize: {
        width: "288px",
        height: "60px"
      },
      errCount: 0,
      hideRefreshButton: !1,
      ready: function () {},
      success: function () {},
      error: function () {}
    };
    this.options = $["extend"]({}, this["defaults"], B);
  };

  s["prototype"] = {
    captchaObj: null,
    init: function () {
      var s = _cB$["q"]("0");

      for (1; s !== _cB$.q(1);) switch (s) {
        case _cB$["q"]("0"):
          this.options.type == "slip" && (this["captchaObj"] = new e(this.$element, this.options));

          _cB$["r"]();

          s = _cB$.q(1);
      }
    },
    refresh: function () {
      var s = _cB$.q(2);

      for (2; s !== _cB$.q("3");) switch (s) {
        case _cB$.q(2):
          this["captchaObj"].refresh();

          _cB$["r"]();

          s = _cB$.q("3");
      }
    }
  };

  var e = function (c, B) {
    this.$element = $(c);
    this.defaults = {
      vSpace: 5,
      server: "",
      captchaIdEle: "",
      captchaValueEle: "",
      imgSize: {
        width: "288px",
        height: "225px"
      },
      blockSize: {
        width: "60px",
        height: "225px"
      },
      barSize: {
        width: "288px",
        height: "60px"
      },
      hideRefreshButton: !1,
      errCount: 0,
      ready: function () {},
      success: function () {},
      error: function () {}
    };
    this.options = $.extend({}, this.defaults, B);

    var t = _cB$.q(4);

    for (4; t !== _cB$.q("5");) switch (t) {
      case _cB$.q(4):
        this.init();

        _cB$["r"]();

        t = _cB$["q"]("5");
    }
  };

  e.prototype = {
    captchaid: "",
    init: function () {
      var t = this;

      var d = _cB$.q(7);

      for (2; d !== _cB$["q"]("9");) switch (d) {
        case _cB$.q(6):
          this["loadImage"]();
          d = _cB$["q"](8);
          break;

        case _cB$["q"](8):
          this["options"]["ready"]();
          d = _cB$["r"]() ? _cB$.q("9") : _cB$["q"]("9");
          break;

        case _cB$.q(7):
          this.loadDom();
          d = _cB$.q(6);
      }

      this.$element[0].onselectstart = document.body["ondrag"] = function () {
        return !1;
      };

      var q = _cB$.q("13");

      for (4; q !== _cB$["q"](16);) switch (q) {
        case _cB$.q(11):
          window["addEventListener"]("mouseup", function () {
            t.end();
          });
          q = _cB$.q(12);
          break;

        case _cB$.q(14):
          window["addEventListener"]("mousemove", function (c) {
            t.move(c);
          });
          q = _cB$.q(15);
          break;

        case _cB$["q"]("10"):
          window.addEventListener("touchmove", function (c) {
            t["move"](c);
          });
          q = _cB$.q(14);
          break;

        case _cB$.q(15):
          window.addEventListener("touchend", function () {
            t["end"]();
          });
          q = _cB$.q(11);
          break;

        case _cB$.q("13"):
          this.addMoveEvent();
          q = _cB$["q"]("10");
          break;

        case _cB$["q"](12):
          t.options.hideRefreshButton && t.$element.find(".verify-refresh").on("click", function () {
            t.refresh();
          });
          q = _cB$.r() ? _cB$.q(16) : _cB$["q"](16);
      }
    },
    addMoveEvent: function () {
      var a = this;

      for (var t = _cB$.q(18); t !== _cB$["q"]("19");) switch (t) {
        case 6 * (6 + 1) * (6 + 2) * (6 + 3) * (6 + 4) * (6 + 5) * (6 + 6) % 7 + 33 + "":
          return -1;

        case _cB$.q(18):
          this["htmlDoms"].move_block.on("touchstart", function (c) {
            a.start(c);
          });
          t = _cB$["q"]("17");
          break;

        case _cB$.q("17"):
          this.htmlDoms.move_block["on"]("mousedown", function (c) {
            a.start(c);
          });
          t = _cB$.r() ? _cB$.q("19") : _cB$["q"]("19");
      }
    },
    loadDom: function () {
      var s = "",
          a = "";
      s += "<div class=\"verify-img-panel\"><img src=\"\" />";

      for (var i = _cB$["q"](20); i !== _cB$["q"](21);) switch (i) {
        case 6 * (6 + 1) * (6 + 2) * (6 + 3) * (6 + 4) * (6 + 5) * (6 + 6) % 7 + 37 + "":
          this.options.hideRefreshButton && (s += "<div  class=\"verify-refresh\"><i class=\"iconfont icon-refresh\"></i></div>");

          _cB$["r"]();

          i = _cB$["q"](21);
      }

      s += "</div>";
      a = "<div  class=\"verify-sub-block\"><img src=\"\" /></div>";
      s += "<div class=\"verify-bar-area\"><span  class=\"verify-msg\">向右拖动滑块填充拼图</span><div class=\"verify-left-bar\"><span  class=\"verify-msg\"></span><div  class=\"verify-move-block\"><i  class=\"verify-icon iconfont icon-right\"></i></div>" + a + "</div></div>";

      var m = _cB$.q("22");

      for (5; m !== _cB$["q"](23);) switch (m) {
        case _cB$["q"]("22"):
          this.$element.append(s);
          m = _cB$.r() ? _cB$["q"](23) : _cB$.q(23);
      }

      this["htmlDoms"] = {
        sub_block: this.$element.find(".verify-sub-block"),
        img_panel: this.$element.find(".verify-img-panel"),
        bar_area: this["$element"].find(".verify-bar-area"),
        move_block: this.$element.find(".verify-move-block"),
        left_bar: this.$element.find(".verify-left-bar"),
        msg: this.$element.find(".verify-msg"),
        icon: this.$element.find(".verify-icon"),
        refresh: this.$element.find(".verify-refresh")
      };
      this.status = !1;
      this["setSize"] = this["resetSize"](this);

      for (var l = _cB$.q(26); l !== _cB$["q"]("30");) switch (l) {
        case _cB$.q(24):
          this["randSet"]();
          l = _cB$["r"]() ? _cB$["q"]("30") : _cB$.q("30");
          break;

        case _cB$["q"](25):
          this.htmlDoms.bar_area.css({
            width: this.setSize.bar_width,
            height: this["options"].barSize.height,
            "line-height": this.options.barSize.height
          });
          l = _cB$.q(27);
          break;

        case _cB$.q(26):
          this.htmlDoms.sub_block.css({
            width: this.options.blockSize.width,
            height: this.options.blockSize.height
          });
          l = _cB$.q(29);
          break;

        case _cB$.q(27):
          this.htmlDoms.move_block["css"]({
            width: this.options.barSize.height,
            height: this.options.barSize.height
          });
          l = _cB$["q"](28);
          break;

        case 5 * (5 + 1) * (5 + 2) * (5 + 3) * (5 + 4) * (5 + 5) % 6 + 49 + "":
          this["htmlDoms"].left_bar.css({
            width: this.options.barSize.height,
            height: this["options"].barSize.height
          });
          l = _cB$["q"](24);
          break;

        case _cB$["q"](29):
          this["htmlDoms"].img_panel["css"]({
            width: this["setSize"].img_width,
            height: this.setSize.img_height
          });
          l = _cB$["q"](25);
      }
    },
    start: function (c) {
      var r = _cB$.q("31");

      for (3; r !== _cB$["q"]("36");) switch (r) {
        case _cB$.q("35"):
          c.stopPropagation();

          _cB$["r"]();

          r = _cB$.q("36");
          break;

        case _cB$.q("33"):
          this.htmlDoms.icon.css("color", "#fff");
          r = _cB$.q("35");
          break;

        case _cB$.q(34):
          this.htmlDoms.move_block["css"]("background-color", "#337ab7");
          r = _cB$.q(32);
          break;

        case _cB$.q(32):
          this.htmlDoms.left_bar.css("border-color", "#337AB7");
          r = _cB$.q("33");
          break;

        case _cB$["q"]("31"):
          this.htmlDoms["msg"].text("");
          r = _cB$["q"](34);
      }

      this.status = !0;
    },
    move: function (c) {
      var a = _cB$["q"](37);

      for (1; a !== _cB$["q"](38);) switch (a) {
        case _cB$["q"](37):
          if (this.status) {
            if (c.touches) t = c.touches[0]["pageX"];else var t = c["clientX"];
            var i = t - e.prototype.getLeft(this["htmlDoms"]["bar_area"][0]);
            i >= this.htmlDoms.bar_area[0]["offsetWidth"] - parseInt(parseInt(this.options["blockSize"].width) / 2) - 2 && (i = this.htmlDoms["bar_area"][0]["offsetWidth"] - parseInt(parseInt(this.options["blockSize"]["width"]) / 2) - 2);
            i <= 0 && (i = parseInt(parseInt(this.options.blockSize.width) / 2));
            var r = i - parseInt(parseInt(this.options.blockSize.width) / 2);
            r < 0 && (r = 0);
            this.htmlDoms.move_block["css"]("left", r + "px");
            this.htmlDoms["left_bar"].css("width", r + "px");
            this["htmlDoms"].sub_block.css("left", r + "px");
          }

          _cB$["r"]();

          a = _cB$.q(38);
      }
    },
    end: function () {
      var s = _cB$.q(39);

      for (3; s !== _cB$.q(40);) switch (s) {
        case _cB$["q"](39):
          this.status && (this.checkImage(), this.status = !1);
          s = _cB$["r"]() ? _cB$.q(40) : _cB$["q"](40);
      }
    },
    checkOk: function () {
      var o = _cB$.q("45");

      for (6; o !== _cB$.q(49);) switch (o) {
        case _cB$["q"](43):
          this["htmlDoms"].icon.addClass("icon-check");
          o = _cB$.q(46);
          break;

        case _cB$["q"]("48"):
          this.htmlDoms["icon"].css("color", "#fff");
          o = _cB$.q(44);
          break;

        case _cB$.q(46):
          this.htmlDoms["refresh"].hide();
          o = _cB$["q"](42);
          break;

        case _cB$.q(44):
          this.htmlDoms.icon["removeClass"]("icon-right");
          o = _cB$.q(43);
          break;

        case _cB$.q("45"):
          this.htmlDoms.move_block.css("background-color", "#fff");
          o = _cB$.q(41);
          break;

        case _cB$.q(42):
          this["htmlDoms"]["move_block"]["unbind"]("mousedown touchstart");
          o = _cB$.q(47);
          break;

        case _cB$.q(47):
          this["options"]["success"]();

          _cB$.r();

          o = _cB$["q"](49);
          break;

        case _cB$["q"](41):
          this.htmlDoms.left_bar.css({
            "border-color": "#5cb85c",
            "background-color": "#5cb85c"
          });
          o = _cB$.q("48");
      }
    },
    checkFail: function (c) {
      var n = this;

      for (var f = _cB$.q(50); f !== _cB$.q("58");) switch (f) {
        case 1 * (1 + 1) * (2 * 1 + 1) % 6 + 88 + "":
          c == 2100 && (n["$element"]["find"](".verify-left-bar:eq(0)").hide(), n["$element"]["find"](".verify-msg:eq(0)")["hide"](), n.$element.find(".verify-bar-area:eq(0)")["append"]("<span class=\"verify-error-msg\"  >验证码过期</span>"));
          f = _cB$.q(54);
          break;

        case _cB$["q"](56):
          this.htmlDoms.left_bar.css("border-color", "#d9534f");
          f = _cB$.q(55);
          break;

        case _cB$.q(51):
          this.options.error();
          f = _cB$.r() ? _cB$["q"]("58") : _cB$.q("58");
          break;

        case _cB$.q("52"):
          this["htmlDoms"].icon.addClass("icon-close");
          f = _cB$.q(57);
          break;

        case _cB$.q(55):
          this.htmlDoms.icon.css("color", "#fff");
          f = _cB$["q"](53);
          break;

        case _cB$.q(50):
          this.htmlDoms.move_block.css("background-color", "#d9534f");
          f = _cB$["q"](56);
          break;

        case _cB$.q(53):
          this.htmlDoms["icon"]["removeClass"]("icon-right");
          f = _cB$["q"]("52");
          break;

        case _cB$.q(54):
          setTimeout(function () {
            n["refreshPos"]();
          }, 700);
          f = _cB$.q(51);
      }

      this.options.errCount++;

      var l = _cB$["q"]("60");

      for (2; l !== _cB$["q"](61);) switch (l) {
        case _cB$.q("60"):
          c == 2100 && this.refresh();
          l = _cB$.q("59");
          break;

        case _cB$.q("59"):
          this.options.errCount >= 5 && (this.refresh(), this["options"].errCount = 0);

          _cB$["r"]();

          l = _cB$.q(61);
      }
    },
    refreshPos: function () {
      var f = _cB$.q(64);

      for (3; f !== _cB$.q("75");) switch (f) {
        case _cB$["q"]("70"):
          this.$element.find(".verify-msg:eq(0)").text("向右拖动滑块填充拼图");
          f = _cB$.q(63);
          break;

        case _cB$.q("74"):
          this["htmlDoms"].left_bar["animate"]({
            width: "60px"
          }, "fast");
          f = _cB$["q"](65);
          break;

        case _cB$["q"]("67"):
          this.htmlDoms.icon.css("color", "#000");
          f = _cB$.q(69);
          break;

        case _cB$.q(62):
          this.addMoveEvent();
          f = _cB$["r"]() ? _cB$.q("75") : _cB$["q"]("75");
          break;

        case _cB$.q(68):
          this.htmlDoms.move_block["css"]("background-color", "#fff");
          f = _cB$["q"]("71");
          break;

        case _cB$["q"](64):
          this["$element"].find(".verify-left-bar:eq(0)").show();
          f = _cB$.q(66);
          break;

        case _cB$.q(73):
          this.htmlDoms["icon"].addClass("icon-right");
          f = _cB$.q("70");
          break;

        case _cB$.q(69):
          this.htmlDoms.icon.removeClass("icon-close");
          f = _cB$["q"](73);
          break;

        case _cB$["q"](66):
          this.$element["find"](".verify-msg:eq(0)").show();
          f = _cB$.q(72);
          break;

        case _cB$.q(72):
          this.htmlDoms.move_block["animate"]({
            left: "0px"
          }, "fast");
          f = _cB$.q(68);
          break;

        case _cB$.q("71"):
          this.htmlDoms["sub_block"]["animate"]({
            left: "0px"
          }, "fast");
          f = _cB$.q("74");
          break;

        case _cB$.q(65):
          this["htmlDoms"]["left_bar"]["css"]({
            "border-color": "#ddd",
            "background-color": "#f0fff0"
          });
          f = _cB$.q("67");
          break;

        case _cB$.q(63):
          this["$element"].find(".verify-error-msg:eq(0)").remove();
          f = _cB$["q"](62);
      }
    },
    resetSize: function (c) {
      var B,
          s,
          a,
          t,
          e,
          q = c.$element.parent().width() || $(window).width(),
          f = c.$element["parent"]().height() || $(window)["height"]();

      for (var m = _cB$.q(81); m !== _cB$["q"](82);) switch (m) {
        case 4 * (4 + 1) * (4 + 2) * (4 + 3) * (4 + 4) % 5 + 119 + "":
          e = c.options.barSize.width.indexOf("%") != -1 ? parseInt(c.options.blockSize["width"]) / 100 * f + "px" : c.options.blockSize.width;

        case _cB$.q(77):
          a = c.options.barSize["width"]["indexOf"]("%") != -1 ? parseInt(c["options"]["barSize"].width) / 100 * q + "px" : c["options"].barSize["width"];
          m = _cB$.q("78");
          break;

        case _cB$.q("76"):
          return {
            img_width: B,
            img_height: s,
            bar_width: a,
            bar_height: t,
            block_width: e
          };

        case _cB$.q("78"):
          t = c["options"].barSize.height.indexOf("%") != -1 ? parseInt(c.options.barSize.height) / 100 * f + "px" : c.options.barSize.height;
          m = _cB$.q("79");
          break;

        case 4 * (4 + 1) * (4 + 2) * (4 + 3) * (4 + 4) % 5 + 118 + "":
          B = c.options.imgSize["width"].indexOf("%") != -1 ? parseInt(c.options["imgSize"].width) / 100 * q + "px" : c["options"]["imgSize"].width;
          m = _cB$.q(80);
          break;

        case _cB$.q(80):
          s = c.options.imgSize["height"]["indexOf"]("%") != -1 ? parseInt(c.options.imgSize.height) / 100 * f + "px" : c["options"]["imgSize"].height;
          m = _cB$["q"](77);
          break;

        case _cB$["q"]("79"):
          e = c.options.barSize.width.indexOf("%") != -1 ? parseInt(c.options.blockSize["width"]) / 100 * f + "px" : c.options["blockSize"].width;
          m = _cB$["q"]("76");
      }
    },
    randSet: function () {
      for (var a = _cB$.q(83); a !== _cB$.q(85);) switch (a) {
        case 0 * (0 + 1) % 2 + 123 + "":
          this.$element.find(".verify-img-panel").css("margin-bottom", this.options.vSpace + "px");
          a = _cB$["q"](84);
          break;

        case _cB$.q(84):
          this.$element["find"](".verify-sub-block").css({
            top: "-" + (parseInt(this.setSize.img_height) + this["options"].vSpace + 2) + "px",
            "background-repeat": "no-repeat",
            "background-size": this["setSize"].block_width + " " + this.setSize["img_height"],
            "background-position": "center",
            position: "absolute"
          });

          _cB$["r"]();

          a = _cB$.q(85);
      }
    },
    checkImage: function () {
      var s = this.gettimestamp(),
          a = this["gettimestamp"](),
          e = this.htmlDoms.move_block["css"]("left").replace("px", "");

      var i = _cB$.q(86);

      for (2; i !== _cB$.q(87);) switch (i) {
        case _cB$["q"](86):
          $("#" + this["options"]["captchaValueEle"]).val(e);

          _cB$["r"]();

          i = _cB$.q(87);
      }

      var o = {
        version: "1.0",
        timestamp: s,
        requestid: a,
        request: {
          imagenumber: e,
          captchaid: this.captchaid
        }
      },
          n = this;

      var b = _cB$["q"](88);

      for (6; b !== _cB$["q"](89);) switch (b) {
        case _cB$.q(88):
          $.ajax({
            url: this.options.server + "check",
            type: "post",
            data: JSON.stringify(o),
            contentType: "application/json",
            success: function (c) {
              c["response"].responsecode == 0 ? n.checkOk() : n["checkFail"](c.response.responsecode);
              n.status = !1;
            },
            error: function () {
              n.checkFail(responsecode);
              n.status = !1;
            }
          });
          b = _cB$.r() ? _cB$.q(89) : _cB$["q"](89);
      }
    },
    createHttpRequest: function () {
      var s = _cB$.q(90);

      for (4; s !== _cB$["q"](91);) switch (s) {
        case _cB$.q(90):
          return window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
      }
    },
    loadImage: function () {
      var s = this.gettimestamp(),
          a = {
        version: "1.0",
        timestamp: s,
        request: {
          type: "slip",
          appid: this.options.appid
        }
      },
          t = this,
          e = this["createHttpRequest"]();

      var h = _cB$["q"]("92");

      for (3; h !== _cB$.q(93);) switch (h) {
        case _cB$.q("92"):
          e.open("post", this.options.server + "get", !0);

          _cB$["r"]();

          h = _cB$.q(93);
      }

      e.responseType = "blob";

      var o,
          d = _cB$.q("94");

      for (6; d !== _cB$.q("95");) switch (d) {
        case _cB$["q"]("94"):
          e.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
          d = _cB$.r() ? _cB$.q("95") : _cB$["q"]("95");
      }

      e["onreadystatechange"] = (o = e, function () {
        if (o.readyState == 4 && o.status == 200) {
          t.captchaid = e.getResponseHeader("gpcaptchaid");
          $("#" + t["options"]["captchaIdEle"])["val"](t["captchaid"]);
          var c = e.getResponseHeader("gpcaptchal"),
              B = Number(c.substring(0, 6)),
              s = Number(c.substring(6, 12)),
              a = window.URL || window.webkitURL,
              i = new Blob([this.response]),
              r = t.$element.find(".verify-img-panel >img")[0];
          $(r).load(function (c) {
            a["revokeObjectURL"](r.src);
          })["attr"]("src", a["createObjectURL"](i.slice(0, B)));
          var h = t.$element["find"](".verify-sub-block >img")[0];
          $(h).load(function (c) {
            a.revokeObjectURL(h.src);
          }).attr("src", a.createObjectURL(i.slice(B, B + s - 1)));
        }
      });

      var q = _cB$.q("96");

      for (5; q !== _cB$.q("97");) switch (q) {
        case _cB$.q("96"):
          e["send"](JSON.stringify(a));

          _cB$["r"]();

          q = _cB$.q("97");
      }
    },
    refresh: function () {
      var a = _cB$["q"](99);

      for (2; a !== _cB$.q(100);) switch (a) {
        case _cB$.q(99):
          this["loadImage"]();
          a = _cB$.q(98);
          break;

        case _cB$["q"](98):
          this.refreshPos();
          a = _cB$.r() ? _cB$["q"](100) : _cB$.q(100);
      }
    },
    getLeft: function (c) {
      var a = _cB$.q(101);

      for (0; a !== _cB$.q("102");) switch (a) {
        case _cB$.q(101):
          return $(c).offset()["left"];
      }
    },
    gettimestamp: function () {
      var s = new Date(),
          a = s.getHours(),
          t = s["getMinutes"](),
          e = s["getSeconds"](),
          i = s["getMilliseconds"]();

      var r = _cB$["q"](103);

      for (6; r !== _cB$.q(104);) switch (r) {
        case _cB$["q"](103):
          return this.pad(a, 2) + this["pad"](t, 2) + this["pad"](e, 2) + this.pad(i, 3);
      }
    },
    pad: function (c, B) {
      for (var t = "", e = c.toString().length; e < B;) {
        t = "0" + t;
        e++;
      }

      var i = _cB$.q(105);

      for (1; i !== _cB$.q(106);) switch (i) {
        case _cB$["q"](105):
          return t + c.toString();
      }
    }
  };

  B = function () {
    var s = _cB$.q(107);

    for (2; s !== _cB$["q"](108);) switch (s) {
      case _cB$.q(107):
        return this || (0, eval)("this");
    }
  }();

  var i = _cB$["q"]("111");

  for (4; i !== _cB$["q"](112);) switch (i) {
    case _cB$["q"]("111"):
      typeof module !== "undefined" && module.exports ? module["exports"] = s : typeof define === "function" && define.amd ? define(function () {
        var a = _cB$.q(109);

        for (5; a !== _cB$.q(110);) switch (a) {
          case _cB$["q"](109):
            return s;
        }
      }) : !("Captcha" in B) && (B["Captcha"] = s);

      _cB$["r"]();

      i = _cB$["q"](112);
  }
}();